package Arithmetic;

public class Operator2 {
    public static void main(String[] args) {
        int a = 10;
        int b = 20;

        // 关系运算符案例

        // 等于 ==
        boolean isEqual = (a == b);
        System.out.println("a == b: " + isEqual); // false

        // 不等于 !=
        boolean isNotEqual = (a != b);
        System.out.println("a != b: " + isNotEqual); // true

        // 大于 >
        boolean isGreater = (a > b);
        System.out.println("a > b: " + isGreater); // false

        // 小于 <
        boolean isLess = (a < b);
        System.out.println("a < b: " + isLess); // true

        // 大于等于 >=
        boolean isGreaterOrEqual = (a >= b);
        System.out.println("a >= b: " + isGreaterOrEqual); // false

        // 小于等于 <=
        boolean isLessOrEqual = (a <= b);
        System.out.println("a <= b: " + isLessOrEqual); // true
    }
}

